//
//  ContentView.swift
//  ClockIn
//
//  Created by enrique leo on 8/8/21.
//

import SwiftUI

struct ContentView: View {
    @State private var selection: Tab = .featured
    
    enum Tab {
        case featured
        case list
    }

    
    var body: some View {
        TabView(selection: $selection) {
            ClockListView()
                .tabItem {
                    Label("发现", systemImage: "list.bullet")
                }
                .tag(Tab.featured)
            
            PostView()
                .tabItem {
                    Label("打卡", systemImage: "pencil.circle")
                }
                .tag(Tab.featured)
            
            UserInfoView()
                .tabItem {
                    Label("我的", systemImage: "person.circle")
                }
                .tag(Tab.featured)
            
            SwiftUIView()
                .tabItem {
                    Label("测试", systemImage: "person.circle")
                }
                .tag(Tab.featured)
        }
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}
